package com.xiaoq.ar.service.impl;

import com.xiaoq.ar.entity.ARActivityEntity;
import com.xiaoq.ar.repository.ARActivityRepository;
import com.xiaoq.ar.service.ARActivityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by chenjh on 2018/3/5.
 */
@Service
public class ARActivityServiceImpl implements ARActivityService {

    @Autowired
    private ARActivityRepository arActivityRepository;

    @Override
    public boolean save(ARActivityEntity entity) {
        return arActivityRepository.save(entity);
    }

    @Override
    public ARActivityEntity getByPrimaryId(String id) {
        return arActivityRepository.getByPrimaryId(id);
    }

    @Override
    public List<ARActivityEntity> getByProviderId(String providerId) {
        return arActivityRepository.getByProviderId(providerId);
    }

    @Override
    public ARActivityEntity getLatestByProviderId(String providerId) {
        return arActivityRepository.getLatestByProviderId(providerId);
    }
}
